//ts-ignore
import request from '@/utils/request'
import type { loginForm, loginResponseData, userResponseData } from './type.ts'
// 统一管理接口 //enum 枚举类型，用来统一管理接口地址
enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info',
}
export const reqLogin = (data: loginForm) =>
  request.post<any, loginResponseData>(API.LOGIN_URL, data)
export const reqUserInfo = (data: any) =>
  request.post<any, userResponseData>(API.USERINFO_URL, data)
